package com.umgsai.thread.thread01;

public class MyThread13 extends Thread {

	@Override
	public void run() {
		super.run();
		try {
			System.out.println("for begin");
			for (int i = 0; i < 100000; i++) {
				System.out.println("i = " + i);
			}
			System.out.println("for end");
			System.out.println("sleep begin...");
			Thread.sleep(20000);
			System.out.println("sleep end...");
		} catch (Exception e) {
			System.out.println("被停止......" + this.isInterrupted());
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		System.err.println("main begin...");
		try {
			MyThread13 thread = new MyThread13();
			thread.start();
			Thread.sleep(10);
			thread.stop();
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.err.println("main end...");
	}
}
